<?php
/**
 * @version 1.0.0
 * @package com_works
 * @copyright Copyright (C) 2013. All rights reserved.
 * @license GNU General Public License version 2 or later; see LICENSE.txt
 * @authorQuang <quang4it@yahoo.com> - http://quang.com
 */
// no direct access
defined('_JEXEC') or die;
global $resize_directory;
//Load admin language file
$lang = JFactory::getLanguage();
$lang->load('com_works', JPATH_ADMINISTRATOR);
if ($this->item) :
    ?>
    <div class="history">
        <a href="<?php echo JRoute::_("index.php?option=com_works&view=works&Itemid=130"); ?>" class="list">
            <img src="images/work_list_19.png" width="20" height="20" border="0" />
        </a> 
        <img src="images/arrow_gray_l.png" alt="" width="9" height="17" border="0" /> 
        <a href="javascript:;"><?php echo $this->item->category_title; ?></a>
    </div>
    <div class="content_detail">
        <div class="work_info">
            <h1><?php echo $this->item->title; ?></h1>
            <p><?php echo $this->item->short_desc; ?></p>
            <div class="work_tech">
                <?php if (isset($this->item->website) && $this->item->website) { ?>
                    <strong>Website:</strong> <a href="<?php echo $this->item->website; ?>" target="_blank"><?php echo $this->item->website; ?></a>
                <?php } ?>
                <?php if (isset($this->item->website) && $this->item->website && isset($this->item->technologies) && $this->item->technologies) { ?>
                    &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;
                <?php } ?>
                <?php if (isset($this->item->technologies) && $this->item->technologies) { ?>
                    <strong>Technologies:</strong> <?php echo $this->item->technologies; ?>
                <?php } ?>
            </div>
        </div>
        <div class="work_photo"><?php echo $this->item->long_desc; ?></div>
    </div>
    <div class="left_project">
        <?php if ($this->item->nearbyProduct[0]) { ?>
            <?php $link = JRoute::_("index.php?option=com_works&view=work&Itemid=130&cat_id={$this->item->nearbyProduct[1]->category_id}&id={$this->item->nearbyProduct[0]->id}"); ?>
            <a href="<?php echo $link; ?>">
                <div class="proj_thumb">
                    <img src="<?php echo $this->item->nearbyProduct[0]->file['image']; ?>" width="324" height="184" border="0" />
                </div>
                <div class="arrow"><img src="images/arrow_bold_15.gif" width="9" height="17" border="0" /></div>
            </a>
        <?php } ?>
    </div>
    <div class="right_project">
        <?php if ($this->item->nearbyProduct[1]) { ?>
            <?php $link = JRoute::_("index.php?option=com_works&view=work&cat_id={$this->item->nearbyProduct[1]->category_id}&Itemid=130&id={$this->item->nearbyProduct[1]->id}"); ?>
            <a href="<?php echo $link; ?>">
                <div class="arrow">
                    <img src="/images/arrow_bold_17.gif" width="9" height="17" border="0" />
                </div>
                <div class="proj_thumb">
                    <img src="<?php echo $this->item->nearbyProduct[1]->file['image']; ?>" width="324" height="184" border="0" />

                </div>
            </a>
        <?php } ?>
    </div>

    <?php
else:
    echo JText::_('COM_WORKS_ITEM_NOT_LOADED');
endif;
?>
